/*
 * @Author: cl
 * @Description: 
 * @Date: 2023-05-06 17:39:30
 * @LastEditTime: 2023-05-06 18:01:28
 * @FilePath: \jsnode\nestjs\naota\prisma\seeds\article.ts
 * @LastEditors: cl
 */
import { PrismaClient } from '@prisma/client'
import {initMock} from '../help'
import { Random } from 'mockjs'
import { random}from 'lodash'


export function createArticle(){
    initMock(20,async (prisma:PrismaClient)=>{
        await prisma.article.create({
            data: {
                title: Random.ctitle(),
                content: Random.string(),
                categoryId: random(1,5),
            }
          })
    })
}